Skip to content

Comments

feat: support include-ims-credentials annotation#224

Merged
moritzraho merged 4 commits intomasterfrom
feat/support-include-ims-credentials
Feb 20, 2026
Merged

feat: support include-ims-credentials annotation#224
moritzraho merged 4 commits intomasterfrom
feat/support-include-ims-credentials

Conversation

@moritzraho
Copy link
Member

@moritzraho moritzraho commented Jan 22, 2026

Description

DRAFT
Depends on a release of adobe/aio-cli-plugin-app#899

Propose a new include-ims-credentials annotation at the action level. The annotation depends on a new IMS_OAUTH_S2S environment variable.

Here is an example:

runtimeManifest:
...
   myAction:
     annotations:
       include-ims-credentials: true 
       # note to reviewer, please let me know what you think of an `include-ims-credentials: ['oauth-s2s']` alternative

Rewrites to

runtimeManifest:
...
   myAction:
     inputs:
       __ims_oauth_s2s:
         client_id: abc
         client_secret: firstofthelist
         org_id: myOrg@AdobeOrg
         scopes: ["openid","AdobeID","abc"]
      __ims_env: stage

Note: the __ims prefix was chosen to align with __ow as in params.__ow_headers

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov
Copy link

codecov bot commented Jan 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@shazron
Copy link
Member

shazron commented Jan 27, 2026

include-ims-credentials: ['oauth-s2s'] are we planning on other credential support? if not, we can keep it simple with true

@moritzraho moritzraho force-pushed the feat/support-include-ims-credentials branch from 93f755b to 2dae593 Compare February 13, 2026 14:13
@moritzraho moritzraho merged commit 84ea46c into master Feb 20, 2026
11 checks passed
@moritzraho moritzraho deleted the feat/support-include-ims-credentials branch February 20, 2026 13:05
* @returns {object|undefined} the inputs or undefined with a warning
*/
function getIncludeIMSCredentialsAnnotationInputs (thisAction, imsAuthObject) {
const env = getCliEnv() || DEFAULT_ENV
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you want to merge properties?
const env = Object.assign({}, DEFAULT_ENV, getCliEnv())

*/
function loadIMSCredentialsFromEnv () {
// constants
const IMS_OAUTH_S2S_ENV_KEY = 'IMS_OAUTH_S2S'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small thing, I know this is a constant and typically we use SCREAMING_SNAKE, but the fact that it is declared like a local var means we can treat it differently. I think const ims_oauth_s2s_env_key would be clearer once we get to

 const imsAuthObject = {
    client_id: process.env[`${ims_oauth_s2s_env_key}_CLIENT_ID`]

and case is somewhat fluid when we get to getIncludeIMSCredentialsAnnotationInputs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants